1. Field of the Invention
The present invention relates to an object-oriented programming process. Especially, it relates to an object managing apparatus for configuring and executing an application program by combining components, and a method thereof.
2. Description of the Related Art
The application programs (applications) of a business system, etc., are often configured by combining program units called components. At the time of configuring/operating (executing) such an application, the component base offers each component, a second storage access function (for example, a database access function), a transaction function, a communication function in distributed environments, etc.
Among these functions, the second storage access function is to access the second storage in accordance with the request from the application, and to write or read the data of a persistence object that is designated by the component. Here, the persistence object indicates the object corresponding to the data in the second storage. This object has a life span as long as that of the data in the second storage.
Since the frequency of writing to/reading from the second storage is greatly related to the performance of the whole application, the caching mechanism of an object is used many times in order to cut the number of accesses to the second storage. In this mechanism, an object with data that has been read from the second storage in the past, is accumulated in the cache in a memory. In the case that the same data is required to be retrieved, the object in the cache is used.
However, there is the following problem in the caching process in the above-mentioned conventional component base.
In the caching process of an object, the validity of the data in a cache becomes important. For example, when an object is registered in a cache and then the application that does not use the cache, modifies the data of the second storage corresponding to the registered object, the data of the object in the cache does not match the data of the second storage.
In this case, a mechanism for performing a caching process that is limited to one transaction process and invalidating the result of the transaction process when data is modified at the time of the termination of the transaction process is required.
However, in the case that the data in the second storage is not modified at all, it is guaranteed that the data of the object and the data in the second storage are always the same. Therefore, the object that is registered in the cache, is always effective.
The caching mechanism possessed by the conventional component base is either the caching mechanism with few effects such that all the applications can be securely actuated or the caching mechanism that is optimized under the application restriction that is imposed on the component base itself. Therefore, there it no alternative to providing a caching mechanism on the application side to materialize the caching strategy suitable for the individual application, thereby increasing the load of application development.